<script type="text/javascript">
    var projectTabSelected = '<?php echo $_SESSION['projectTab'];?>';
    $(document).ready(function () {

        $("#tab1").click(function () {
            $("#tab1").addClass('current');
            $("#tab2").removeClass('current');
            $("#tab3").removeClass('current');
            $('#tab2Content').hide();
            $('#tab3Content').hide();
            $('#tab1Content').show('fast');

            $.ajax({
                url: AJAX_PROCESS_URL+'setTabProject',
                type: 'POST',
                data: "tab=1",
                error: function(){
                    alert('Connection error!');
                }
            });
        });

        $("#tab2").click(function () {
            $("#tab1").removeClass('current');
            $("#tab3").removeClass('current');
            $("#tab2").addClass('current');
            $('#tab1Content').hide();
            $('#tab3Content').hide();
            $('#tab2Content').show('fast');
            $.ajax({
                url: AJAX_PROCESS_URL+'setTabProject',
                type: 'POST',
                data: "tab=2",
                error: function(){
                    alert('Connection error!');
                }
            });
        });
        $("#tab3").click(function () {
            $("#tab1").removeClass('current');
            $("#tab2").removeClass('current');
            $("#tab3").addClass('current');
            $('#tab1Content').hide();
            $('#tab2Content').hide();
            $('#tab3Content').show('fast');

            $.ajax({
                url: AJAX_PROCESS_URL+'setTabProject',
                type: 'POST',
                data: "tab=3",
                error: function(){
                    alert('Connection error!');
                }
            });
        });

        if(projectTabSelected=='1'){
            $("#tab1").click();
        }else if(projectTabSelected=='2'){
            $("#tab2").click();
        }else if(projectTabSelected=='3'){
            $("#tab3").click();
        }else{
            $("#tab1").click();
        }

    });
</script>

<div class="right_content_project">
    <div class="toplink" style="margin-top: 0px;margin-bottom: 10px"><img src="/images/iconhome.gif" /><a href="#"><b>[Trang chủ]</b></a>&raquo;<a href="#" class="pagehere">[Thông tin dự án]</a></div>
    <div class="geo_project">
        <div class="top_san_BDS_l">[Bạn đang xem các dự án tại]: <span ><font class="textbold"><?php $arrgeo=getGeoByLink($param[1]);echo $arrgeo['geo_title'];?></font></span></div>

        <ul class="tab_project" id="tab_project">
            <li class="current" id="tab1"><a href="javascript: void(0);"><b>[DỰ ÁN BẤT ĐỘNG SẢN KINH DOANH]</b></a></li>
            <li id="tab2"><a href="javascript: void(0);"><b>[DỰ ÁN KHU CÔNG NGHIỆP]</b></a></li>
            <li id="tab3"><a href="javascript: void(0);"><b>[DỰ ÁN KHU DU LỊCH & DỰ ÁN KHÁC]</b></a></li>
        </ul>
    </div>
    <div id="tab1Content" class="content_tab_outproject">
        <div class="content_tab_project">
        <ul>
            <?
            $rsTab1 = getProjectTab('1',$param[1],1);
            while($rs=$db->fetch_array($rsTab1['rs'])) {
                ?>
            <li><div style="float:left;width: 65%">
                    <a href="<?php echo get_link("projects","detail",$rs['title_link']); ?>" class="thumb"><img src="<?php if(get_property_thumb($rs['thumb'],'47-47')=='') echo SITE_IMAGES_URL.'/no-100-100.gif'; else  echo get_property_thumb($rs['thumb'],'47-47');?>" /></a>
                    <h2><a href="<?php echo get_link("projects","detail",$rs['title_link']); ?>"><?php echo limitWord($rs['title'],10);?></a></h2>
                <p><?php echo limitWord($rs['description'],45);?></p></div><div style="float:left;width: 200px;margin-left: 20px;margin-top: 5px;font-weight: bold;text-align: center;font-size: 11px"><h2>[NHÀ ĐẦU TƯ]</h2><p><?php echo $rs['chudautu'];?></p></div>

            </li>
            <?php
        }
        ?>
        </ul>
        </div>
        <div class="phantrang">
            <div class="pagination1">
                <?php
                if($rsTab1['totalPages']>1) {
                    echo paging($rsTab1["page"],$rsTab1["totalPages"],get_link_page('projects','cat',$rsTab1["geo_link"]));
                }
                ?>
            </div>
        </div>
    </div>
   <div id="tab2Content" class="content_tab_outproject" style="display:none;">
        <div class="content_tab_project">
        <ul>
            <?php
            $rsTab2 = getProjectTab('2',$param[1],2);
            while($rs=$db->fetch_array($rsTab2['rs'])) {
                ?>
            <li><div style="float:left;width: 65%">
                    <a href="<?php echo get_link("projects","detail",$rs['title_link']); ?>" class="thumb"><img src="<?php if(get_property_thumb($rs['thumb'],'47-47')=='') echo SITE_IMAGES_URL.'/no-100-100.gif'; else echo get_property_thumb($rs['thumb'],'47-47');?>" /></a>
                    <h2><a href="<?php echo get_link("projects","detail",$rs['title_link']); ?>"><?php echo limitWord($rs['title'],10);?></a></h2>
                <p><?php echo limitWord($rs['description'],10);?></p></div><div style="float:left;width: 200px;margin-left: 20px;margin-top: 5px;font-weight: bold;text-align: center;font-size: 11px"><h2>[NHÀ ĐẦU TƯ]</h2><p><?php echo $rs['chudautu'];?></p></div>
            </li>
            <?php
        }
        ?>
        </ul>
        </div>
        <div class="phantrang">
            <div class="pagination1">
                <?php

                if($rsTab2['totalPages']>1) {
                    echo paging($rsTab2["page"],$rsTab2["totalPages"],get_link_page('projects','cat',$rsTab2["geo_link"]));
                }
                ?>
            </div>
        </div>
    </div>
   <div id="tab3Content" class="content_tab_outproject" style="display:none;">
        <div class="content_tab_project">
        <ul>
            <?php
            $rsTab3 = getProjectTab('3',$param[1],3);
            while($rs=$db->fetch_array($rsTab3['rs'])) {
                ?>
            <li><div style="float:left;width: 65%">
                    <a href="<?php echo get_link("projects","detail",$rs['title_link']); ?>" class="thumb"><img src="<?php if(get_property_thumb($rs['thumb'],'47-47')=='') echo SITE_IMAGES_URL.'/no-100-100.gif'; else echo get_property_thumb($rs['thumb'],'47-47');?>" /></a>
                    <h2><a href="<?php echo get_link("projects","detail",$rs['title_link']); ?>"><?php echo limitWord($rs['title'],10);?></a></h2>
                <p><?php echo limitWord($rs['description'],10);?></p></div><div style="float:left;width: 200px;margin-left: 20px;margin-top: 5px;font-weight: bold;text-align: center;font-size: 11px"><h2>[NHÀ ĐẦU TƯ]</h2><p><?php echo $rs['chudautu'];?></p></div>
            </li>
            <?php
        }
        ?>
        </ul>
        <div class="phantrang">
            <div class="pagination1">
                <?php
                if($rsTab3['totalPages']>1) {
                    echo paging($rsTab3["page"],$rsTab3["totalPages"],get_link_page('projects','cat',$rsTab3["geo_link"]));
                }
                ?>
            </div>
        </div>
    </div>
</div>      

</div>